#ifndef DDSCOM_H
#define DDSCOM_H

#include <windows.h>
#include <QTextBrowser>
#include <QTime>
#include <QFile>
#include <QString>

#define PAC_TRANS_SIZE  36

class DDSCOM
{
public:
    DDSCOM();

//    int Device_connect(QString UDiskPath);
//    int Device_disconnect(QString UDiskPath);
    int Device_connect(void);
    int Device_disconnect(void);
    QString UDisk_Find(void);
//    int sendPara(QString UDiskPath, char paradat[]);
    int sendPara(void);

    QString UDiskPath;
    int mcuConnect_flag;

    union PAC
    {
        struct CTLDAT
        {
            unsigned char wave_select;
            unsigned long int frequence;
            //unsigned long int buffer_len;
            unsigned long int vpp;
            unsigned long int offset;
            char filename[23];
        } ctl;
        //char transfer[17];
        char transfer[PAC_TRANS_SIZE];
    } pacdat;

    //QString UDiskPath;
};

/*class ddsComParameter
{
    public:
        QString UDiskPath;
        int mcuConnect_flag;

        union PAC
        {
            struct CTLDAT
            {
                unsigned char wave_select;
                unsigned long int frequence;
                //unsigned long int buffer_len;
                unsigned long int vpp;
                unsigned long int offset;
                char filename[23];
            } ctl;
            //char transfer[17];
            char transfer[36];
        } pacdat;
};*/

#endif // DDSCOM_H
